angular.module('furion.core.route.main', [])

.config ($stateProvider, $urlRouterProvider, $ionicConfigProvider) ->
  $ionicConfigProvider.views.swipeBackEnabled(false);

  $ionicConfigProvider.tabs.position("bottom") # Places them at the bottom for all OS
  $ionicConfigProvider.tabs.style("standard") # Makes them all look the same across all OS
  $ionicConfigProvider.navBar.alignTitle('center')
  $ionicConfigProvider.platform.android.scrolling.jsScrolling(false)

  # Ionic uses AngularUI Router which uses the concept of states
  # Learn more here: https://github.com/angular-ui/ui-router
  # Set up the various states which the app can be in.
  # Each state's controller can be found in controllers.js
  $stateProvider

  .state 'welcome',
    url: '/welcome'
    templateUrl: 'templates/others/welcome.html'
    controller: 'WelcomeCtrl'

  .state 'app',
    url: '/app'
    abstract: true
    templateUrl: 'templates/tabs/tabs.html'
    controller: 'AppCtrl'

  # if none of the above states are matched, use this as the fallback
  # $urlRouterProvider.otherwise '/welcome'

  return # .config ($stateProvider, $urlRouterProvider) ->
